package com.weixing.mall.provider.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.weixing.mall.provider.mapper.MsgCodeLimitMapper;
import com.weixing.mall.provider.model.domain.MsgCodeLimit;
import com.weixing.mall.provider.model.query.MsgCodeLimitQuery;
import com.weixing.mall.provider.model.vo.MsgCodeLimitVo;
import com.weixing.mall.provider.service.IMsgCodeLimitService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 会员模块-验证码频率限制表 服务实现类
 * </p>
 *
 * @author Small
 * @since 2019-11-13
 */
@Service
public class MsgCodeLimitServiceImpl extends ServiceImpl<MsgCodeLimitMapper, MsgCodeLimit> implements IMsgCodeLimitService {

    @Override
    public IPage<MsgCodeLimitVo> selectOfPage(Page page, MsgCodeLimitQuery msgCodeLimitQuery) {
        return baseMapper.selectOfPage(page,msgCodeLimitQuery);
    }

    @Override
    public MsgCodeLimit selectByMobile(String mobile) {
        return getOne(new QueryWrapper<MsgCodeLimit>().eq("mobile",mobile));
    }
}
